/**
 * @Author:Geln Yang
 * @Created:2008-8-3
 * $ Revision: 1.0 $
 * $ Author: Geln Yang $
 * $ Date: 2008-8-3 $
 */
package com.hgy.commonsale.webui.action.user;

import com.hgy.commonsale.webui.action.AnonymousAction;
import com.hgy.commonsale.webui.context.IApplicationSessionContext;
import com.opensymphony.xwork.ActionContext;

/**
 * @Author:Geln Yang
 * @Created:2008-8-3
 */
public class LogoutAction extends AnonymousAction {
	private IApplicationSessionContext sessionContext;

	public String execute() throws Exception {
		String userId = sessionContext.getAccount();
		//        HttpSession session = ServletActionContext.getRequest().getSession();
		sessionContext.clearContext(userId);

		ActionContext.getContext().getSession().clear();
		return SUCCESS;
	}

	public void setSessionContext(IApplicationSessionContext sessionContext) {
		this.sessionContext = sessionContext;
	}
}
